package com.njthird.busi.service.impl;

import java.util.List;
import com.njthird.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.njthird.busi.mapper.BusiCusordersMapper;
import com.njthird.busi.domain.BusiCusorders;
import com.njthird.busi.service.IBusiCusordersService;

/**
 * 客户订单Service业务层处理
 * 
 * @author njthird
 * @date 2020-08-19
 */
@Service
public class BusiCusordersServiceImpl implements IBusiCusordersService 
{
    @Autowired
    private BusiCusordersMapper busiCusordersMapper;

    /**
     * 查询客户订单
     * 
     * @param id 客户订单ID
     * @return 客户订单
     */
    @Override
    public BusiCusorders selectBusiCusordersById(Long id)
    {
        return busiCusordersMapper.selectBusiCusordersById(id);
    }

    /**
     * 查询客户订单列表
     * 
     * @param busiCusorders 客户订单
     * @return 客户订单
     */
    @Override
    public List<BusiCusorders> selectBusiCusordersList(BusiCusorders busiCusorders)
    {
        return busiCusordersMapper.selectBusiCusordersList(busiCusorders);
    }

    /**
     * 新增客户订单
     * 
     * @param busiCusorders 客户订单
     * @return 结果
     */
    @Override
    public int insertBusiCusorders(BusiCusorders busiCusorders)
    {
        busiCusorders.setCreateTime(DateUtils.getNowDate());
        return busiCusordersMapper.insertBusiCusorders(busiCusorders);
    }

    /**
     * 修改客户订单
     * 
     * @param busiCusorders 客户订单
     * @return 结果
     */
    @Override
    public int updateBusiCusorders(BusiCusorders busiCusorders)
    {
        busiCusorders.setUpdateTime(DateUtils.getNowDate());
        return busiCusordersMapper.updateBusiCusorders(busiCusorders);
    }

    /**
     * 批量删除客户订单
     * 
     * @param ids 需要删除的客户订单ID
     * @return 结果
     */
    @Override
    public int deleteBusiCusordersByIds(Long[] ids)
    {
        return busiCusordersMapper.deleteBusiCusordersByIds(ids);
    }

    /**
     * 删除客户订单信息
     * 
     * @param id 客户订单ID
     * @return 结果
     */
    @Override
    public int deleteBusiCusordersById(Long id)
    {
        return busiCusordersMapper.deleteBusiCusordersById(id);
    }
}
